package com.zhixi.pattern.notimportant.facadepattern.operation;

/**
 * @作者 ShuHaoNan
 * @邮箱 shuhaonan1@gmail.com
 * @时间 2020/11/18 16:39
 */
public class ModenPostOffice {

    private ILetterProcess letterProcess;
    private Police police;

    public ModenPostOffice(ILetterProcess letterProcess, Police police) {
        this.letterProcess = letterProcess;
        this.police = police;
    }

    public void sendLetter(String content, String address) {
        letterProcess.writeContent(content);
        letterProcess.fillEnvelope(address);
        police.checkLetter(letterProcess);
        letterProcess.letterInotoEnvelope();
        letterProcess.sendLetter();
    }

}
